package ar.edu.caece.pl.asem.model.impl;

import java.util.ArrayList;
import java.util.List;

import ar.edu.caece.pl.asem.model.ISymbol;

public class SymbolsTable {
	
	private static List<ISymbol> definedVars = new ArrayList<ISymbol>();
	private static List<ISymbol> definedConstants = new ArrayList<ISymbol>();
	private static List<ISymbol> definedArrays = new ArrayList<ISymbol>();
	private static List<ISymbol> definedProcedures = new ArrayList<ISymbol>();
	private static List<ISymbol> definedFunctions = new ArrayList<ISymbol>();
	
	public boolean containsVar(ISymbol var) {
		return definedVars.contains(var);
	}
	public boolean containsConstant(ISymbol cons) {
		return definedConstants.contains(cons);
	}
	public boolean containsArray(ISymbol array) {
		return definedArrays.contains(array);
	}
	public boolean containsProcedure(ISymbol procId) {
		return definedProcedures.contains(procId);
	}
	public boolean containsFunction(ISymbol funcId) {
		return definedFunctions.contains(funcId);
	}
	
	public void addVar(ISymbol var) {
		definedVars.add(var);
	}
	public void addConstant(ISymbol cons) {
		definedVars.add(cons);
	}
	public void addArray(ISymbol array) {
		definedVars.add(array);
	}
	public void addProcedure(ISymbol proc) {
		definedVars.add(proc);
	}
	public void addFunction(ISymbol func) {
		definedVars.add(func);
	}
}
